﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// AlarmHis_210816数据模型对象
    /// </summary>
    [Serializable]
    public partial class AlarmHis_210816Mod
    {
        /// <summary>
        /// 初始化AlarmHis_210816数据模型对象
        /// </summary>
        public AlarmHis_210816Mod()
        {
            
        }
        /// <summary>
        /// 初始化AlarmHis_210816数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="iD">ID</param>
        /// <param name="deviceNo">DeviceNo</param>
        /// <param name="volCur">VolCur</param>
        /// <param name="tempV">TempV</param>
        /// <param name="baseV">BaseV</param>
        /// <param name="bState">bState</param>
        /// <param name="occorTime">occorTime</param>
        public AlarmHis_210816Mod(long iD,string deviceNo,int volCur,int tempV,int baseV,int bState,DateTime occorTime)
        {
            //给ID字段赋值
            this.ID = iD;
            //给DeviceNo字段赋值
            this.DeviceNo = deviceNo;
            //给VolCur字段赋值
            this.VolCur = volCur;
            //给TempV字段赋值
            this.TempV = tempV;
            //给BaseV字段赋值
            this.BaseV = baseV;
            //给bState字段赋值
            this.BState = bState;
            //给occorTime字段赋值
            this.OccorTime = occorTime;
        }
        
		//属性存储数据的变量
        private long _iD;
        private string _deviceNo;
        private int _volCur;
        private int _tempV;
        private int _baseV;
        private int _bState;
        private DateTime _occorTime;
        
        /// <summary>
        /// ID
        /// </summary>
        public long ID
        {
            get { return this._iD; }
            set { this._iD = value; }
        }
        /// <summary>
        /// DeviceNo
        /// </summary>
        public string DeviceNo
        {
            get { return this._deviceNo; }
            set { this._deviceNo = value; }
        }
        /// <summary>
        /// VolCur
        /// </summary>
        public int VolCur
        {
            get { return this._volCur; }
            set { this._volCur = value; }
        }
        /// <summary>
        /// TempV
        /// </summary>
        public int TempV
        {
            get { return this._tempV; }
            set { this._tempV = value; }
        }
        /// <summary>
        /// BaseV
        /// </summary>
        public int BaseV
        {
            get { return this._baseV; }
            set { this._baseV = value; }
        }
        /// <summary>
        /// bState
        /// </summary>
        public int BState
        {
            get { return this._bState; }
            set { this._bState = value; }
        }
        /// <summary>
        /// occorTime
        /// </summary>
        public DateTime OccorTime
        {
            get { return this._occorTime; }
            set { this._occorTime = value; }
        }
        
        /// <summary>
        /// 对比两个AlarmHis_210816数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的AlarmHis_210816数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成AlarmHis_210816数据模型对象
            AlarmHis_210816Mod alarmHis_210816Mod = obj as AlarmHis_210816Mod;
            //判断是否转换成功
            if (alarmHis_210816Mod == null) return false;
            //进行匹配属性的值
            return
                //判断ID是否一致
                this.ID == alarmHis_210816Mod.ID &&
                //判断DeviceNo是否一致
                this.DeviceNo == alarmHis_210816Mod.DeviceNo &&
                //判断VolCur是否一致
                this.VolCur == alarmHis_210816Mod.VolCur &&
                //判断TempV是否一致
                this.TempV == alarmHis_210816Mod.TempV &&
                //判断BaseV是否一致
                this.BaseV == alarmHis_210816Mod.BaseV &&
                //判断bState是否一致
                this.BState == alarmHis_210816Mod.BState &&
                //判断occorTime是否一致
                this.OccorTime == alarmHis_210816Mod.OccorTime;
        }
        /// <summary>
        /// 将当前AlarmHis_210816数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将AlarmHis_210816数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将ID进行按位异或运算处理
                this.ID.GetHashCode() ^
                //将DeviceNo进行按位异或运算处理
                (this.DeviceNo == null ? 2147483647 : this.DeviceNo.GetHashCode()) ^
                //将VolCur进行按位异或运算处理
                this.VolCur.GetHashCode() ^
                //将TempV进行按位异或运算处理
                this.TempV.GetHashCode() ^
                //将BaseV进行按位异或运算处理
                this.BaseV.GetHashCode() ^
                //将bState进行按位异或运算处理
                this.BState.GetHashCode() ^
                //将occorTime进行按位异或运算处理
                this.OccorTime.GetHashCode();
        }
        /// <summary>
        /// 将当前AlarmHis_210816数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前AlarmHis_210816数据模型对象转换成字符串副本
            return
                "[" +
                //将ID转换成字符串
                this.ID + "," +
                //将DeviceNo转换成字符串
                this.DeviceNo + "," +
                //将VolCur转换成字符串
                this.VolCur + "," +
                //将TempV转换成字符串
                this.TempV + "," +
                //将BaseV转换成字符串
                this.BaseV + "," +
                //将bState转换成字符串
                this.BState + "," +
                //将occorTime转换成字符串
                this.OccorTime +
                "]";
        }
    }
}
